﻿using AIVision.Model.EntityModels;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AIVision.Repository.Entitys
{
    public class CheckStation
    {
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 工位位置序号——从上料后第一个位置开始算
        /// </summary>
        public int Index { get; set; }
        /// <summary>
        /// 工位编号
        /// </summary>
        public string? StationCode { get; set; }
        /// <summary>
        /// 工位类型——相机位(图像位)、空位置、下料位
        /// </summary>
        public string? StationType { get; set; }
        /// <summary>
        /// 是否保存合格图片文件
        /// </summary>
        public bool IsSaveOKImage { get; set; }
        /// <summary>
        /// 是否保存缺陷图片文件
        /// </summary>
        public bool IsSaveDefectImage { get; set; }
        /// <summary>
        /// 图片文件夹保存路径
        /// </summary>
        public string? ImageFileSavePath { get; set; }



        //取图模式（直取，本地暂存）
        public bool ImageCache { get; set; }

      

        public string? HSmartWindowName { get; set; }


        public string? InspectType { get; set; }
        public string? HCFilePath { get; set; }
        public string? DLProcessFilePath { get; set; }
        public string? DLModelFilePath { get; set; }
        public string? DLDevice { get; set; }

        public int? OKScore { get; set; }



        /// <summary>
        /// 下料分值，如果该工位是下料位，则使用该分计算
        /// </summary>
        public int? OutScore { get; set; }

        public int PhotoDelay { get; set; }

        public int CheckTemplateId { get; set; }
        [ForeignKey("CheckTemplateId")]
        public virtual CheckTemplate CheckTemplate { get; set; }

        public int? CameraId { get; set; }
        [ForeignKey("CameraId")]
        public virtual Camera Camera { get; set; }

        public virtual List<DefectItem> DefectItems { get; set; }
    }
}
